<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>es6 解构扩展运算符</title>
</head>
<body>
<script>
    /*
      let array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
      let [a, b, c, ] = array;

      console.log(a);
      console.log(b);
      console.log(c);
    */

    let array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
    let [a, b, ...c] = array;

    console.log(a);
    console.log(b);
    console.log(c);

    let person = {
        name: "abc",
        gender: "男",
        age: 18
    };

    let {name, ...other } = person
    console.log(name);
    console.log(other);


</script>
</body>
</html>